package com.xbongbong.pro.enums.menu.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.paas.enums.MenuTypeEnum;
import com.xbongbong.pro.enums.AccessLinkEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/1/15 15:00
 * @desrcption 短信群发
 * @since v1.0
 */
@Getter
public enum GroupMessageMenuEnum {

    /**
     * 短信群发枚举
     */

    CONFIG_INFORMATION("enum.groupMessageMenu.name.config_information", XbbRefTypeEnum.CONFIG_INFORMATION.getAlias(), XbbRefTypeEnum.CONFIG_INFORMATION.getCode(),
            AccessLinkEnum.CONFIG_INFORMATION, "controlCenter", MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.SMS_SET_VIEW.getAlias()),

    RECHARGE_RECORD("enum.groupMessageMenu.name.recharge_record", XbbRefTypeEnum.RECHARGE_RECORD.getAlias(),XbbRefTypeEnum.RECHARGE_RECORD.getCode(),
            AccessLinkEnum.RECHARGE_RECORD, "controlCenter", MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.SMS_RECHARGE.getAlias()),

    SEND_MESSAGE("enum.groupMessageMenu.name.send_message", XbbRefTypeEnum.SEND_MESSAGE.getAlias(), XbbRefTypeEnum.SEND_MESSAGE.getCode(),
            AccessLinkEnum.SEND_MESSAGE, PaasConstant.HOME_STRING, MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.SMS_SEND.getAlias()),

    RECORD_VIEW("enum.groupMessageMenu.name.record_view", XbbRefTypeEnum.RECORD_VIEW.getAlias(), XbbRefTypeEnum.RECORD_VIEW.getCode(),
            AccessLinkEnum.RECORD_VIEW, PaasConstant.HOME_STRING, MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.SMS_VIEW.getAlias()),

    REPLY_VIEW("enum.groupMessageMenu.name.reply_view", XbbRefTypeEnum.REPLY_VIEW.getAlias(), XbbRefTypeEnum.REPLY_VIEW.getCode(),
    AccessLinkEnum.REPLY_VIEW, PaasConstant.HOME_STRING, MenuTypeEnum.MENU.getType(), ProPermissionAliasEnum.SMS_VIEW.getAlias())
    ;

    /**
     * 名称
     */
    private String name;

    /**
     * saas业务标识
     */
    private String alias;

    /**
     * saas业务标识
     */
    private Integer code;
    /**
     * 地址
     */
    private AccessLinkEnum accessLinkEnum;

    /**
     * 所属于哪个页面，home：首页；controlCenter：管理中心
     */
    private String belong;

    /**
     * 类型
     * @see MenuTypeEnum
     */
    private Integer type;

    /**
     * 权限
     */
    private String permission;


    GroupMessageMenuEnum(String name,String alias, Integer code, AccessLinkEnum accessLinkEnum, String belong, Integer type, String permission){
        this.name = name;
        this.alias = alias;
        this.code = code;
        this.accessLinkEnum = accessLinkEnum;
        this.belong = belong;
        this.type = type;
        this.permission = permission;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
